#include"tree.h"

void test()
{
    BTDataType arr[] = { "ABD##E#H##CF##G##" };
    int i = 0;
    BTNode* root = BinaryTreeCreate(arr, sizeof(arr) / sizeof(arr[0]), &i);
    printf("%d \n", BinaryTreeSize(root));
    printf("%d\n", BinaryTreeLeafSize(root));
    printf("%d %d %d\n", BinaryTreeLevelKSize(root, 1), BinaryTreeLevelKSize(root, 2), BinaryTreeLevelKSize(root, 3));
    BTNode* node=BinaryTreeFind(root, 'E');
    printf("%c\n", node->data);
    BinaryTreePrevOrder(root);
    printf("\n");
    BinaryTreeInOrder(root);
    printf("\n");
    BinaryTreePostOrder(root);
    printf("\n");
    BinaryTreeLevelOrder(root);
    printf("\n");
    printf("%d", BinaryTreeComplete(root));
    BinaryTreeDestory(&root);
}
int main()
{
    test();
    return 0;
}